package com.qfedu.service.impl;

import com.qfedu.dao.ManagerDao;
import com.qfedu.dao.impl.ManagerDaoImpl;
import com.qfedu.entity.Managers;
import com.qfedu.service.ManagerService;

import java.util.List;

/**
 * @version v1.0
 * @Date 2023/10/9 18:12
 * @Author DARKER
 * @Email 1402216045@qq.com
 */
public class ManagerServiceImpl implements ManagerService {
    private ManagerDao  dao = new ManagerDaoImpl();
    @Override
    public void add(Managers manager) {
        dao.insert(manager);
    }

    @Override
    public void update(Managers manager) {
        dao.update(manager);
    }

    @Override
    public void del(Integer id) {
        dao.delete(id);
    }

    @Override
    public void delBatch(List<Integer> ids) {
        dao.delBatch(ids);
    }

    @Override
    public Managers findByName(String name) {
        return dao.selectByName(name);
    }

    @Override
    public List<Managers> findAll() {
        return dao.selectAll();
    }
}
